package com.qf.common.exceptions;

import com.alibaba.fastjson.JSON;
import feign.Response;
import feign.codec.ErrorDecoder;

import java.io.IOException;

public class FeignErrorDecoder implements ErrorDecoder {

    @Override
    public Exception decode(String methodKey, Response response) {
//        System.out.println("error");
//        Resp resp = JSON.parseObject(response.body().asInputStream(), Resp.class);
//        if (resp.getStatus() != Resp.RESP_STATUS.SUCCESS.getCode()) {
//            throw new RuntimeException(resp.getMessage());
//        }
        return null;
    }
}
